package com.hyy.dao;

import com.hyy.bean.MaskUser;

import java.sql.SQLException;
import java.util.List;

public interface UserDao {

	//用户管理
	int deleteByPrimaryKey(Integer ID);
	int insert(MaskUser maskUser) throws SQLException;
	MaskUser selectByPrimaryKey(Integer ID);
	List<MaskUser> selectAll();
	//更改密码
	boolean updateByPrimaryKey(MaskUser maskUser)throws SQLException;
	//确认用户名唯一
	boolean checkUsername(String username) throws SQLException;
	//进行账户密码的确认
	MaskUser selectLogin(String username, String password) throws SQLException;
	MaskUser selectAdminLogin(String username, String password) throws SQLException;

	//修改密码
	boolean updatePasswordByUserId(Long userId, String newPassword )throws SQLException;
}
